package com.huixh.train.business.dto;

import java.util.Date;

/**
 * @author huixh
 */
public class ConfirmOrderMqDto {
    private String logId;

    private Date date;

    private String trainCode;

    public ConfirmOrderMqDto() {
    }

    public ConfirmOrderMqDto(String logId, Date date, String trainCode) {
        this.logId = logId;
        this.date = date;
        this.trainCode = trainCode;
    }

    public String getLogId() {
        return logId;
    }

    public void setLogId(String logId) {
        this.logId = logId;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getTrainCode() {
        return trainCode;
    }

    public void setTrainCode(String trainCode) {
        this.trainCode = trainCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof ConfirmOrderMqDto that)) return false;

        if (getLogId() != null ? !getLogId().equals(that.getLogId()) : that.getLogId() != null) return false;
        if (getDate() != null ? !getDate().equals(that.getDate()) : that.getDate() != null) return false;
        return getTrainCode() != null ? getTrainCode().equals(that.getTrainCode()) : that.getTrainCode() == null;
    }

    @Override
    public int hashCode() {
        int result = getLogId() != null ? getLogId().hashCode() : 0;
        result = 31 * result + (getDate() != null ? getDate().hashCode() : 0);
        result = 31 * result + (getTrainCode() != null ? getTrainCode().hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "ConfirmOrderMqDto{" +
                "logId='" + logId + '\'' +
                ", date=" + date +
                ", trainCode='" + trainCode + '\'' +
                '}';
    }
}
